<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use EasyWeChat\Foundation\Application;

class MenuController extends Controller
{
    //
    public $menu;

    public function __construct(Application $app)
    {
    	$this->menu = $app->menu;
    }

    public function menu()
    {
    	$buttons = [
		    [
		        "name"       => "关于我们",
		        "sub_button" => [
		            [
		                "type" => "view",
		                "name" => "公司简介",
		                "url"  => "http://smile.ngrok.xiaomiqiu.cn"
		            ],
		            [
		                "type" => "view",
		                "name" => "企业文化",
		                "url"  => "http://smile.ngrok.xiaomiqiu.cn/company"
		            ],
		            [
		                "type" => "view",
		                "name" => "大事记",
		                "url"  => "http://smile.ngrok.xiaomiqiu.cn"
		            ],
		        ],
		    ],
		    [
		        "name"       => "新闻中心",
		        "sub_button" => [
		            [
		                "type" => "view",
		                "name" => "公司新闻",
		                "url"  => "http://smile.ngrok.xiaomiqiu.cn/newslist"
		            ],
		            [
		                "type" => "view",
		                "name" => "项目展示",
		                "url"  => "http://smile.ngrok.xiaomiqiu.cn/items"
		            ],
		            [
		                "type" => "view",
		                "name" => "最美一线",
		                "url"  => "http://smile.ngrok.xiaomiqiu.cn/photo"
		            ],
		        ],

		    ],
			[
		        "type" => "click",
		        "name" => "联系我们",
		        "key"  => "V1001_TODAY_MUSIC"
		    ],
		];
		$this->menu->add($buttons);
    }


}
